<?php

use think\migration\Seeder;

class ControlToEpaData extends Seeder
{
    /**
     * 管控 - 管控下达
     */
    public function run()
    {
        $table = $this->table('control_to_epa');
        $rows  = [];
        for ($i = 1; $i <= 53; $i++) {
            $rows[] = [
                'control_mode_id'     => 1,
                'control_measure_id'  => 1,
                'company_id'          => $i,
                'control_plan_number' => 'CZ2019-06-27 001号',
                'receive_user_id'     => mt_rand(1, 100),
                'charge_user_id'      => mt_rand(1, 100),
                'create_time'         => time(),
            ];
        }
        $table->insert($rows)->save();
    }
}